#include "Include.h"

PAGED_LOOKASIDE_LIST KlxQueueEntryLookasideList;

BOOLEAN KlxQueueInitialize()
{
	ExInitializePagedLookasideList(&KlxQueueEntryLookasideList,
		NULL,
		NULL,
		0,
		sizeof(KQUEUE_ENTRY),
		'SxlK',
		0 );
	return TRUE;
}

VOID KlxQueueUninitialize()
{
	ExDeletePagedLookasideList(&KlxQueueEntryLookasideList);
}

PKQUEUE_ENTRY	KlxAllocQueueEntry()
{
	return (PKQUEUE_ENTRY)ExAllocateFromPagedLookasideList(&KlxQueueEntryLookasideList);
}

VOID KlxFreeQueueEntry(PKQUEUE_ENTRY Stack)
{
	RtlZeroMemory(Stack,sizeof(*Stack));
	ExFreeToPagedLookasideList(&KlxQueueEntryLookasideList,Stack);
}